package com.example.tang.zhayan.ui;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.RelativeLayout;

import com.example.tang.zhayan.R;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.ViewInject;
import org.xutils.x;

/**
 * Created by tang on 2015/12/19.
 */
@ContentView(R.layout.activity_setting)
public class SettingActivity extends AppCompatActivity implements View.OnClickListener{

    @ViewInject(R.id.rl_setting_sign)
    private RelativeLayout rl_setting_sign;//我的签到

    @ViewInject(R.id.rl_setting_wallet)
    private RelativeLayout rl_setting_wallet;//我的钱包

    @ViewInject(R.id.rl_setting_personally)
    private RelativeLayout rl_setting_personally;//个人详情

    @ViewInject(R.id.rl_setting_order)
    private RelativeLayout rl_setting_order;//我的订单

    @ViewInject(R.id.rl_setting_bag)
    private RelativeLayout rl_setting_bag;//购物袋

    @ViewInject(R.id.rl_setting_address)
    private RelativeLayout rl_setting_address;//我的地址

    @ViewInject(R.id.rl_setting_set)
    private RelativeLayout rl_setting_set;//我的设置

    @ViewInject(R.id.rl_setting_suggest)
    private RelativeLayout rl_setting_suggest;//意见反馈

    @ViewInject(R.id.rl_setting_psd)
    private RelativeLayout rl_setting_psd;//密码修改

    @ViewInject(R.id.btn_setting_unregeister)
    private Button btn_setting_unregeister;//注销

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        x.view().inject(this);
        initView();
    }

    private void initView() {
        rl_setting_sign.setOnClickListener(this);
        rl_setting_wallet.setOnClickListener(this);
        rl_setting_personally.setOnClickListener(this);
        rl_setting_order.setOnClickListener(this);
        rl_setting_bag.setOnClickListener(this);
        rl_setting_address.setOnClickListener(this);
        rl_setting_set.setOnClickListener(this);
        rl_setting_suggest.setOnClickListener(this);
        rl_setting_psd.setOnClickListener(this);
        btn_setting_unregeister.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {

        switch (v.getId()){
            case R.id.rl_setting_sign://我的签到

                break;
            case R.id.rl_setting_wallet://我的钱包
                Intent walletIntent = new Intent(this,SettingWalletActivity.class);
                startActivity(walletIntent);
                break;
            case R.id.rl_setting_personally://个人详情
                Intent personallyIntent = new Intent(this,SettingPersonallyActivity.class);
                startActivity(personallyIntent);
                break;
            case R.id.rl_setting_order://我的订单
                break;
            case R.id.rl_setting_bag://购物袋
                Intent bagIntent = new Intent(this,ShopBagActivity.class);
                startActivity(bagIntent);
                break;
            case R.id.rl_setting_address://我的地址
                break;
            case R.id.rl_setting_set://我的设置
                Intent settingSetIntent = new Intent(this,SettingSetActivity.class);
                startActivity(settingSetIntent);
                break;
            case R.id.rl_setting_suggest://意见反馈
                Intent settingSuggestIntent = new Intent(this,SettingSuggestActivity.class);
                startActivity(settingSuggestIntent);
                break;
            case R.id.rl_setting_psd://密码修改
                Intent settingPsdIntent = new Intent(this,SettingPsdActivity.class);
                startActivity(settingPsdIntent);
                break;
            case R.id.btn_setting_unregeister://注销
                break;

        }
    }
}
